package br.com.medmark.model.hibernate;

import java.io.Serializable;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import br.com.medmark.model.hibernate.dao.AlocaoProfissionalDAO;
import br.com.medmark.model.hibernate.dao.GenericoDAOImpl;

@Entity
@Table(name="tb_alocacao_profissional")
public class AlocacaoProfissional implements Serializable{
	
	private static final long serialVersionUID = -3331284207861912861L;

	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	@Column(name="codigo")
	private int codigo;
	
	@OneToOne(cascade={CascadeType.MERGE,CascadeType.PERSIST,CascadeType.REFRESH})
	@JoinColumn(name="codigo_profissional")
	private Profissional profissional;
	
	@ManyToOne
	@JoinColumn(name="codigo_clinica")
	private Clinica clinica;

	public int getCodigo() {
		return codigo;
	}

	public void setCodigo(int codigo) {
		this.codigo = codigo;
	}


	public Profissional getProfissional() {
		return profissional;
	}

	public void setProfissional(Profissional profissional) {
		this.profissional = profissional;
	}

	public Clinica getClinica() {
		return clinica;
	}

	public void setClinica(Clinica clinica) {
		this.clinica = clinica;
	}

}
